import Vue from "vue";
import antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
import photoSwipe from "kuan-vue-photoswipe";

import components from "@/common";
import mixins from "@/utils/mixins";
import request from "@/utils/request";
import PageLayout from "@/layouts/PageLayout";
import directives from "@/utils/directives";
import confirmModal from "@/utils/confirmModal";

import router from "./router";
import store from "./store";

import "@/styles/index.less";

import App from "./App.vue";

Vue.prototype.$http = request;
Vue.prototype.$bus = new Vue(); // event bus
Vue.prototype.$confirmModal = confirmModal;

Vue.use(antd); // vue antd注册
Vue.use(photoSwipe); // 多图预览
Vue.use(components); // 全局组件
Vue.mixin(mixins); // mixins
Vue.use(directives); // 自定义指令
Vue.component("page-layout", PageLayout);

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
